x86/VPMU: save VPMU state for PV guests during context switch
authorBoris Ostrovsky <boris.ostrovsky@oracle.com>
Thu, 9 Jul 2015 11:51:42 +0000 (13:51 +0200)
committerJan Beulich <jbeulich@suse.com>
Thu, 9 Jul 2015 11:51:42 +0000 (13:51 +0200)
commita03bfb9166b9aa0ea611e44359282e9c39362481
tree37c77f0a293dc996de85a2b4e4987b94998379c4
parenta8b551321ee7a505a433a01c38070f1a2375b6ad
x86/VPMU: save VPMU state for PV guests during context switch

Save VPMU state during context switch for both HVM and PV(H) guests.

A subsequent patch ("x86/VPMU: NMI-based VPMU support") will make it possible
for vpmu_switch_to() to call vmx_vmcs_try_enter()->vcpu_pause() which needs
is_running to be correctly set/cleared. To prepare for that, call context_saved()
before vpmu_switch_to() is executed. (Note that while this change could have
been dalayed until that later patch, the changes are harmless to existing code
and so we do it here)

Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Dietmar Hahn <dietmar.hahn@ts.fujitsu.com>
xen/arch/x86/domain.c